import React, { Component } from 'react'
import {NavLink} from 'react-router-dom'
import RouterView from '../../router/router-view'
import {RouteItem} from '../../router/router-config'
import './main.scss'

interface Iprops{
    routes:RouteItem[]
}

export default class Main extends Component<Iprops> {
    render() {
        let {routes} = this.props;
        return (
            <div className="main-wrap">
                <div className="con">
                    <RouterView routes={routes}></RouterView>
                </div>
                <footer className="footer">
                    <NavLink to="/main/home">首页</NavLink>
                    <NavLink to="/main/my">我的</NavLink>
                </footer>
            </div>
        )
    }
}
